﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Licenta1
{
    class StatementList:Statement
    {
        public Statement currentS, nextS;

        public StatementList(Context context, Statement stat1, Statement stat2)
            : base(context)
        {
            currentS = stat1;
            nextS = stat2;
        }

        public override void Execute()
        {
            currentS.Execute();
            if (nextS != null)
                nextS.Execute();
        }

    }
}
